<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约详情</title>
    <link rel="stylesheet" href="../css/page-health-orderDetail.css" />
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script>
        var id = getUrlParam("id");//根据请求URL中的参数名称获取对应的值
        var telephone= getUrlParam("telephone");//根据请求URL中的参数名称获取对应的值
        var orderDate= getUrlParam("orderDate");//根据请求URL中的参数名称获取对应的值
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">
            <div class="project-img">
                <img :src="imgUrl" width="100%" height="100%" />
            </div>
            <div class="project-text">
                <h1 class="tit" ><font size="6"><b>{{map.setmealName}}</b></font></h1>

              体检人: <p style="font-size:15px" class="subtit">{{map.name}}</p>
                体检日期: <p class="subtit">{{map.orderDate}}</p>
               体检结果: <p class="subtit">{{map.healthResult}}</p>
            </div>
        </div>
        <div class="table-listbox">
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                <span><h1><b>--------------------健康师建议及治疗方案如下-------------------</b></h1></span>
            </div>
            <hr/>
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span></i>
                <font size="5px"> 健康师姓名 :{{map.doctorName}}</font>
            </div>

            <hr/>
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span></i>
               <font size="5px"> 健康师建议治疗方案: {{map.doctorAdvice}}</font>
            </div>
            <hr/>
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span></i>
              <h1>建议饮食:</h1>
                <div class="list-column1">
                    <ul class="list">
                        <li class="list-item" v-for="food in foodList">
                                <div class="item-body">
                                    <h2 class="ellipsis item-title"><font color="green" ><b>{{food.foodName}}</b></font></h2>
                                </div>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
            <hr>
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span></i>
                <h1>建议运动:</h1><div class="list-column1">
                <ul class="list">
                    <li class="list-item" v-for="exercise in exerciseList">
                        <div class="item-body">
                            <h2 class="ellipsis item-title"><font color="green" ><b>{{exercise.name}}</b></font></h2>
                        </div>
                        </a>
                    </li>
                </ul>
            </div>
            </div>
            <div class="box-button">
                <button  type="button" class="btn order-btn">点评一下吧</button>
            </div>
        </div>
    </div>
</div>
<script>
    var vue = new Vue({
        el:'#app',
        data:{
            imgUrl:null,//套餐对应的图片链接
            map:{},//模型数据（套餐信息），用于页面数据展示
            foodList:[],
            exerciseList:[]

        },
        methods:{
            toOrderInfo(){
                window.location.href = "orderInfo.html?id=" + id;
            }
        },
        mounted(){
            //发送ajax请求，根据套餐ID查询套餐详细信息（包括套餐基本信息、套餐包含的检查组、检查组包含的检查项）
            axios.post("/intervention/findById.do?id=" + id+"&telephone="+telephone+"&orderDate="+orderDate).then((response) => {
                if(response.data.flag){
                    this.map= response.data.data;
                    this.foodList= response.data.data.foodList;
                    this.exerciseList= response.data.data.exerciseList;

                    this.imgUrl = 'http://qgg5hsnp8.hd-bkt.clouddn.com/' + this.map.img;
                }
            });
        }
    });
</script>
</body>